package org.wii.config.sentinel;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.wii.base.annotation.ExceptionModule;
import org.wii.base.exception.constant.ExceptionModuleConstant;
import org.wii.base.exception.constant.ExceptionTypeEnum;
import org.wii.base.exception.constant.IExceptionErrCode;

/**
 * @author tanghong on 2022/12/23
 */
@Getter
@AllArgsConstructor
@ExceptionModule(type = ExceptionTypeEnum.SYSTEM, code = ExceptionModuleConstant.SYSTEM)
public enum SentinelExceptionEnum implements IExceptionErrCode {
    FLOW(1, "服务限流了,请稍后再试！"),
    DEGRADE(2, "服务降级了,请稍后再试！"),
    PARAM(3, "热点参数限流,请稍后再试！"),
    SYSTEM_BLOCK(4, "系统负载较高,请稍后再试！"),
    AUTHORITY(5, "服务授权未通过,请联系客服！");
    private long code;
    private String message;
}
